Skip to content

Adding @var annotation for return type #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

ThomasLandauer
Copy link
Member

... to better emphasize what you'll get back; especially since @return \Symfony\Component\Mime\Email|null isn't rendered right, due to Codeception/Codeception#6104

So I added a docblock within the docblock, so to say ;-)

... to better emphasize what you'll get back; especially since `@return \Symfony\Component\Mime\Email|null` isn't rendered right, due to Codeception/Codeception#6104

So I added a docblock within the docblock, so to say ;-)
ThomasLandauer added a commit to ThomasLandauer/module-symfony that referenced this pull request Mar 15, 2021
I shortened the example, cause `$emails[0]->getTo()[0];` looks strange ;-) Instead, I added the "See also"-links which (I think) are a good idea in general since the page gets longer and longer, so it's harder to get an overview what functions do exist at all...

The `@var` annotation syntax is taken from https://phpstan.org/writing-php-code/phpdoc-types#general-arrays - I'm not 100% sure if this is the right way.

The closing `*/` in my new `@var` line might break the page rendering completely ;-) (same as in Codeception#119) - is there a way to escape this?
@ThomasLandauer ThomasLandauer mentioned this pull request Mar 15, 2021
@TavoNiievez
Copy link
Member

This implicitly and explicitly is a solution for unwanted rendering behavior on the website.
However, this is not the ideal solution.

Besides, you can't add this annotation because you close the comment block */ and this causes the CI build to fail.

You can change john_doe@user.com to john_doe@example.com in the other PR that you have open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants